const { blog_article, blog_user, blog_album, moment } = require('@/model');
class DashboardService { 
  async getDashboardData() { 
    const [articleCount, userCount, albumCount, momentCount] = await Promise.all([
      blog_article.count(),
      blog_user.count(),
      blog_album.count(),
      moment.count(),
    ]);
    return {
      articleCount,
      userCount,
      albumCount,
      momentCount,
    }
  }
}
module.exports = new DashboardService()